﻿<%@ Control Language="C#" AutoEventWireup="true" Inherits="SouthernLand.Controls.LogonBox"
    CodeBehind="LogonBox.ascx.cs" %>
<!-- Begin Xy ly nut enter khi logon -->
<script>
    function clickButton(e, buttonid) {
        var bt = document.getElementById(buttonid);
        if (typeof bt == 'object') {
            if (navigator.appName.indexOf("Netscape") > (-1)) {
                if (e.keyCode == 13) {
                    bt.click();
                    return false;
                }
            }
            if (navigator.appName.indexOf("Microsoft Internet Explorer") > (-1)) {
                if (event.keyCode == 13) {
                    bt.click();
                    return false;
                }
            }
        }
    } 
</script>
<asp:Button runat="server" Text="" EnableTheming="false" ValidationGroup="Logon"
    CssClass="Hidden" ID="btPro" Height="0px" OnClick="btLogon_Click" UseSubmitBehavior="false" />
<!-- End Xy ly nut enter khi logon -->
<asp:UpdatePanel ID="UpdatePanelLogonBox" runat="server" UpdateMode="Conditional">
    <contenttemplate>
                                                
<table cellpadding="0" cellspacing="0">
    <tr>
        <td class="list-real-estate-frame-top-left">&nbsp;</td>
        <td align="center" class="list-real-estate-frame-top width-70">
            <span class="Frame_Title">Đăng nhập</span> 
        </td>
        <td class="list-real-estate-frame-top-right">&nbsp;</td>
    </tr>
     <tr>
        <td class="list-real-estate-frame-mid-left"></td>
        <td>
            <table width="100%" border="0" height="100%" cellpadding="0" cellspacing="0">
                <tr>
                    <td valign="top" align="left">
                        <table width="100%" border="0" cellpadding="0" cellspacing="0">
                            <tr>
                                <td align="left" style="padding-top:5px;">
                                    <asp:Panel ID="PanelLogon" runat="server" DefaultButton="btLogon">
                                        <table align="center" cellpadding="2" cellspacing="0" border="0">
                                            <tr>
                                                <td align="center">
                                                    <asp:Label runat="server" ID="lblMsg" ForeColor="red"></asp:Label>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="left">
                                                    Tên đăng nhập:</td>
                                            </tr>
                                            <tr id="Tr4" visible="true" runat="server">
                                                <td>
                                                    <asp:TextBox ValidationGroup="Logon" ID="txtEmail" MaxLength="200" runat="server" Width="150" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="left" style="padding-top:5px;">
                                                    Mật khẩu:</td>
                                            </tr>
                                            <tr id="Tr1" runat="server">
                                                <td>
                                                    <asp:TextBox ValidationGroup="Logon" ID="txtPassword" TextMode="Password" MaxLength="200" runat="server" Width="150" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="right" style="padding-bottom:3px;">
                                                    <asp:Button ValidationGroup="Logon" runat="server" ID="btLogon" CssClass="button-logon-user" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="right" style="padding-bottom:3px;">
                                                    <table>
                                                        <tr>
                                                            <td><img src="<%=Globals.ImagesUrl() %>bulletArrow.gif"/></td>
                                                            <td><a href="<%=Globals.ApplicationPath %>Membership/CreateUser.aspx"><u>Ðăng ký</u></a></td>
                                                            <td>&nbsp;<img src="<%=Globals.ImagesUrl() %>bulletArrow.gif"/></td>
                                                            <td><a href="<%=Globals.ApplicationPath %>Membership/PasswordRecovery.aspx"><u><%=ResourceManager.GetString("Membership_ForgotPassword")%></u></a></td>
                                                        </tr>
                                                    </table>
                                                </td>
                                            </tr>
                                        </table>
                                    </asp:Panel>
                                    
                                    <asp:LoginView ID="LoginView1" runat="server">
                                        <RoleGroups>
                                            <asp:RoleGroup Roles="Customers">
                                                <ContentTemplate>
                                                         <table align="center" cellpadding="6" cellspacing="0" border="0">
                                                            <tr>
                                                                <td align="center">
                                                                     Xin chào:
                                                                    <asp:LoginName ID="LoginName1" runat="server" Font-Bold="true" />
                                                                    <br /><br />
                                                                    <asp:LoginStatus runat="server" ForeColor="red"  Font-Underline="true" LogoutText="Thoát" ID="LoginStattus" />
                                                                </td>
                                                            </tr>
                                                            
                                                             <tr>
                                                                <td align="center" style="padding-top:12px;">
                                                                    <a href="<%=Globals.ApplicationPath %>Membership/CreateUser.aspx?Action=Edit"><u><%=ResourceManager.GetString("Membership_ChangeInformation")%></u></a>
                                                                </td>
                                                            </tr>
                                                            
                                                             <tr>
                                                                <td align="center">
                                                                    <a href="<%=Globals.ApplicationPath %>Membership/ChangePassword.aspx"><u><%=ResourceManager.GetString("ChangePassword")%></u></a>
                                                                </td>
                                                            </tr>
                                                          </table>
                                                </ContentTemplate>
                                            </asp:RoleGroup>
                                        </RoleGroups>
                                    </asp:LoginView>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                </table>
        </td>
        <td class="list-real-estate-frame-mid-right"></td>
    </tr>
    <tr>
        <td class="list-real-estate-frame-bot-left"></td>
        <td align="center" class="list-real-estate-frame-bot-center"></td>
        <td class="list-real-estate-frame-bot-right"></td>
    </tr>
</table>

</contenttemplate>
    <triggers>
         <asp:AsyncPostBackTrigger ControlID="btPro" EventName="Click"></asp:AsyncPostBackTrigger>
  </triggers>
</asp:UpdatePanel>
